Skip to content

Restrict workspace writes to admins - #1919

Merged
RhysSullivan merged 22 commits into
mainfrom
workspace-admin-writes
Sep 2, 2026
Merged

Restrict workspace writes to admins#1919
RhysSullivan merged 22 commits into
mainfrom
workspace-admin-writes

Conversation

@RhysSullivan

@RhysSullivan RhysSullivan commented Sep 1, 2026

Copy link
Copy Markdown
Collaborator

Summary

In an organization workspace, only admins can change workspace settings. Members keep read access and their personal resources. The server enforces the rule at every write path: the dashboard API, MCP sessions, and browser approvals. First of two stacked PRs split from #1786.

Restricted writes:

  • Workspace integrations and connections: create, replace, delete, reconnect.
  • Workspace OAuth clients and custom OAuth apps.
  • Tool policies.

Roles come from live membership at each decision point, including resume of a paused execution and browser-approval polls. Session metadata carries an explicit role model, and legacy metadata fails closed. Connection replacement uses versioned credential references, so a crash mid-write leaves a detectable retryable state with a trace id.

Verification

  • bun run format:check
  • bun run lint
  • bun run typecheck
  • bun run test
  • e2e — workspace-write-permissions (cloud and selfhost), mcp-workspace-write-permissions (cloud), admin-users-console (cloud and selfhost), connect-link-multi-org (cloud). Member writes are rejected, and readbacks prove they did not persist. Admin writes succeed.

Checklist

  • Added a changeset (bun run changeset), or this change needs none.
  • Added or updated tests for the new behaviour.
  • No secrets, credentials, or private data in the diff.

@RhysSullivan RhysSullivan changed the title workspace admin writes Restrict workspace writes to admins Sep 1, 2026
@RhysSullivan RhysSullivan mentioned this pull request Sep 1, 2026
8 tasks
@github-actions

github-actions Bot commented Sep 1, 2026

Copy link
Copy Markdown
Contributor

Cloudflare preview

Torn down — the PR is closed.

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
executor-marketing 322dc6b Commit Preview URL

Branch Preview URL
Sep 02 2026, 10:33 AM

Co-authored-by: Max schwenk <maschwenk@gmail.com>
@pkg-pr-new

pkg-pr-new Bot commented Sep 1, 2026

Copy link
Copy Markdown

Open in StackBlitz

@executor-js/cli

npm i https://pkg.pr.new/@executor-js/cli@1919

@executor-js/config

npm i https://pkg.pr.new/@executor-js/config@1919

@executor-js/execution

npm i https://pkg.pr.new/@executor-js/execution@1919

@executor-js/sdk

npm i https://pkg.pr.new/@executor-js/sdk@1919

@executor-js/codemode-core

npm i https://pkg.pr.new/@executor-js/codemode-core@1919

@executor-js/runtime-quickjs

npm i https://pkg.pr.new/@executor-js/runtime-quickjs@1919

@executor-js/plugin-file-secrets

npm i https://pkg.pr.new/@executor-js/plugin-file-secrets@1919

@executor-js/plugin-graphql

npm i https://pkg.pr.new/@executor-js/plugin-graphql@1919

@executor-js/plugin-keychain

npm i https://pkg.pr.new/@executor-js/plugin-keychain@1919

@executor-js/plugin-mcp

npm i https://pkg.pr.new/@executor-js/plugin-mcp@1919

@executor-js/plugin-onepassword

npm i https://pkg.pr.new/@executor-js/plugin-onepassword@1919

@executor-js/plugin-openapi

npm i https://pkg.pr.new/@executor-js/plugin-openapi@1919

executor

npm i https://pkg.pr.new/executor@1919

commit: 322dc6b

@RhysSullivan
RhysSullivan force-pushed the workspace-admin-writes branch from 6d1d838 to 1a0e196 Compare September 1, 2026 18:42
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Sep 1, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Updated (UTC)
✅ Deployment successful!
View logs
executor-cloud 322dc6b Sep 02 2026, 10:34 AM

@RhysSullivan
RhysSullivan marked this pull request as ready for review September 2, 2026 10:40
@RhysSullivan
RhysSullivan merged commit caa0391 into main Sep 2, 2026
44 checks passed
@RhysSullivan RhysSullivan mentioned this pull request Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant